package cn.hesion.designpattern.LSP;

public class Client {
    public static void main(String[] args) {
        Square square = new Square();
        square.setLength(10);
        resize(square);
    }

    public static void resize(Rectangle rectangle){
        while(rectangle.getWidth() >= rectangle.getHeight()){
            rectangle.setHeight(rectangle.getHeight()+1);
            System.out.println("width:"+rectangle.getWidth()+",height:"+rectangle.getHeight());
        }
        System.out.println("resize结果:" +
                "\nwidth:"+rectangle.getWidth()+",height:"+rectangle.getHeight());
    }
}
